package com.example.demo.demoApi.apiHandler;

import com.example.demo.demoApi.msg.AbstractMsg;
import com.example.demo.exception.APICommonCode;


public abstract class AbstractResponseMsg<T extends AbstractResponseBody> extends AbstractMsg {

    private ResponseHeader header = ResponseHeader.builder()
            .code(APICommonCode.SUCCESS.getCode())
            .msg(APICommonCode.SUCCESS.getMsg())
            .build();

    public ResponseHeader getHeader() {
        return header;
    }

    public void setHeader(ResponseHeader header) {
        this.header = header;
    }

    public abstract T getBody();

    public abstract void setBody(T body) ;

}
